package com.nimlib.msg;

import com.alibaba.fastjson.JSONObject;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;

//一个不会发送的消息,只是用来本地提示
public class LocalHouseInfoMessage implements MsgAttachment {
    private String address;
    private String code;

    public String getAddress() {
        return address;
    }

    public String getShowAddress(){
        return "他在这条消息发出之前看了你的"+ this.address+"&nbsp;&nbsp;<font color='#FAA805'>查看房源</font>";
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String toJson(boolean send) {
        JSONObject json = new JSONObject();
        json.put("code",code);
        String address = "他在这条消息发出之前看了你的"+this.address+"&nbsp;&nbsp;<font color='#FAA805'>查看房源</font>";
        json.put("address",address);
        return json.toJSONString();
    }
}
